/*未访问队列 */
package frontier;


import util.RedisAPI;

public class RedisQueue implements UnVisitedUrl{
	private RedisAPI redisStore = null;
	private String key=null;
	public RedisQueue(String key){
		redisStore = new RedisAPI();
		redisStore.deleteKey("visitedUrl");
		this.key = key;
	}
	public void add(String members) {
		redisStore.add(key, members);
	}
	
	public boolean isEmpty() {
		return redisStore.isEmpty(key);
	}
	public String remove(int i) {
		return redisStore.remove(key);
	}
	
	public long size() {
		return redisStore.size(key);
	}
	
	public boolean contains(String member) {
		return redisStore.contains(key, member);
	}
}
